<?php

function get_url($path, $method, $args) {
	$url = "index.php?";
	if ($path) $url .="path=$path&";
	if ($method) $url .="method=$method&";
	foreach ($args as $var => $val) 
		$url .= "$var=".urlencode($val)."&";
	return $url;
}